import { defineStore } from "pinia";
import routers from "@/router/routers";
import { MenuRoutersType } from "@/store/modules/types/routers";

let useMenuRoutersStore = defineStore("menuRouters", {
  state: (): MenuRoutersType => {
    return {
      menuRouters: routers as any,
    };
  },
  actions: {
    pushRouters() {
      console.log(1111);

      this.menuRouters.push({
        name: "xxx",
        path: "yyy",
        components: {},
        meta: {
          title: "xxx",
        },
      } as any);
    },
  },
  getters: {},
});

export default useMenuRoutersStore;
